/**
 * @author: YunTao.Li
 * @create: 2020-10-28 10:20
 * @description:
 **/
public class Solution1 {


    /**
     * @Description: 前序遍历
     * @Param: [treeNode]
     * @return: void
     * @Author: hu_pf
     * @Date: 2019/11/26
     */
    private static void frontOrder(TreeNode<String> treeNode) {
        if (treeNode == null) {
            return;
        }
        System.out.printf(treeNode.data);
        frontOrder(treeNode.leftNode);
        frontOrder(treeNode.rightNode);
    }

    /**
     * @Description: 中序遍历
     * @Param: [treeNode]
     * @return: void
     * @Author: hu_pf
     * @Date: 2019/11/26
     */
    private static void middleOrder(TreeNode<String> treeNode) {
        if (treeNode == null) {
            return;
        }
        middleOrder(treeNode.leftNode);
        System.out.printf(treeNode.data);
        middleOrder(treeNode.rightNode);
    }

    /**
     * @Description: 后序遍历
     * @Param: [treeNode]
     * @return: void
     * @Author: hu_pf
     * @Date: 2019/11/26
     */
    private static void afterOrder(TreeNode<String> treeNode) {
        if (treeNode == null) {
            return;
        }
        afterOrder(treeNode.leftNode);
        afterOrder(treeNode.rightNode);
        System.out.printf(treeNode.data);
    }
}
